package com.qf.spring.pojo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class Address {
    private String city;
    private int num;

    public Address(@Value("beijing") String city, @Value("15") int num) {
        this.city = city;
        this.num = num;
    }



    @Override
    public String toString() {
        return "Address{" +
                "city='" + city + '\'' +
                ", num=" + num +
                '}';
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }
}
